package work.pcdd.validator.entity;

import lombok.Data;
import work.pcdd.validator.common.ValidateGroup;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @Author zimingl
 * @Date 2022/10/16 20:49
 * @Description: TODO
 */
@Data
public class User {

    @NotBlank(message = "用户名不能为空")
    @Size(message = "用户名长度 [1-3] ", min = 1, max = 3,groups = ValidateGroup.FirstGroup.class)
    private String username;
    @Min(message = "id不得小于0", value = 0)
    private Integer id;

}
